package DAO;

import javabean.Maintenance;

import java.util.List;

public interface IMaintenanceDAO {
    public boolean addMaintenance(Maintenance maintenance) throws Exception;
    public boolean addUnassignedMaintenance(Maintenance maintenance) throws Exception;//添加未分配的维修单

    public List<Maintenance> getAllMaintenance() throws Exception;//查询所有维修单

    public List<Maintenance> addUnassignedMaintenanceByCID(String CustomerID) throws Exception;
    public List<Maintenance> getUnassignedMaintenance() throws Exception;//查询未分配的维修单

    public List<Maintenance> getMaintenanceByCID(String CustomerID) throws Exception;//根据客户ID查询维修单

    public List<Maintenance> getMaintenanceByTID(String TechnicianID) throws Exception;//根据技术人员ID查询维修单

    public boolean distributionMaintenance(Maintenance maintenance, String TechnicianID) throws Exception;//分配维修单
    public boolean updateMaintenance(Maintenance maintenance) throws Exception;//更新维修单

    public boolean deleteMaintenance(Maintenance maintenance) throws Exception;//删除维修单

    public Maintenance getMaintenanceByID(int MaintenanceID) throws Exception;//根据维修单ID查询维修单
    public List<Maintenance> getPendingMaintance(String technicianID) throws Exception;//根据技术人员ID查询待维修的维修单

    public List<Maintenance> getInProcessMaintenance(String technicianID) throws Exception;//根据技术人员ID查询正在维修的维修单

    public boolean completeMaintenance(String MaintenanceID) throws Exception;//完成维修单

    public boolean inProcessMaintenance(String MaintenanceID) throws Exception;//开始维修单

    public boolean evaluateMaintenance(int MaintenanceID, String Evaluation) throws Exception;//评价维修单
}
